<template>
	<div>
		<el-dialog
			title="代理账单详情"
			:visible="visible"
			width="1200px"
			class=""
			:destroy-on-close="true"
			:before-close="handleClose"
			@close="handleClose"
		>
			<div class="contentBox mt30">
				{{ dayjs(String(curData.cycleStartDate)).format('YYYY-MM-DD') }}
				00:00:00 至
				{{ dayjs(String(curData.cycleEndDate)).format('YYYY-MM-DD') }}
				23:59:59
			</div>
			<el-table
				v-loading="loading"
				element-loading-spinner="el-icon-loading"
				size="mini"
				class="small-size-table"
				:data="[curData]"
				style="width: 100%; margin: 15px 0"
				:header-cell-style="getRowClass"
				highlight-current-row
			>
				<el-table-column
					prop="proxyName"
					align="center"
					label="代理账号"
				>
					<template slot-scope="scope">
						{{ scope.row.proxyName }}
					</template>
				</el-table-column>
				<el-table-column
					prop="shouldReceiptPaymentParentAmount"
					align="center"
					label="应收上级"
				>
					<template slot="header" slot-scope="{ column, $index }">
						应收上级
						<span>
							<el-tooltip
								class="item"
								effect="dark"
								content="本期团队盈亏+其他资金变动+上期应收上级-上期应付上级＞0的金额"
								placement="top-start"
							>
								<i class="el-icon-question"></i>
							</el-tooltip>
						</span>
					</template>
					<template slot-scope="scope">
						<span
							v-if="
								scope.row.shouldReceiptPaymentParentAmount > 0
							"
						>
							{{
								handleNumber(
									'USDT',
									Math.abs(
										scope.row
											.shouldReceiptPaymentParentAmount
									),
									2
								)
							}}
						</span>
						<span v-else>$0.00</span>
					</template>
				</el-table-column>
				<el-table-column
					prop="shouldReceiptPaymentParentAmount"
					align="center"
					label="应付上级"
				>
					<template slot="header" slot-scope="{ column, $index }">
						<span>
							应付上级
							<el-tooltip
								class="item"
								effect="dark"
								content="本期团队盈亏+其他资金变动+上期应收上级-上期应付上级＜0的金额"
								placement="top-start"
							>
								<i class="el-icon-question"></i>
							</el-tooltip>
						</span>
					</template>
					<template slot-scope="scope">
						<span
							v-if="
								scope.row.shouldReceiptPaymentParentAmount < 0
							"
						>
							{{
								handleNumber(
									'USDT',
									Math.abs(
										scope.row
											.shouldReceiptPaymentParentAmount
									),
									2
								)
							}}
						</span>
						<span v-else>$0.00</span>
					</template>
				</el-table-column>
				<el-table-column
					prop="shouldReceiptChildAmount"
					align="center"
					label="应收下级"
				>
					<template slot="header" slot-scope="{ column, $index }">
						<span>
							应收下级
							<el-tooltip
								class="item"
								effect="dark"
								content="汇总当期应收下级的总额"
								placement="top-start"
							>
								<i class="el-icon-question"></i>
							</el-tooltip>
						</span>
					</template>
					<template slot-scope="scope">
						<span>
							{{
								handleNumber(
									'USDT',
									Math.abs(
										scope.row.shouldReceiptChildAmount
									),
									2
								)
							}}
						</span>
					</template>
				</el-table-column>
				<el-table-column
					prop="shouldPaymentChildAmount"
					align="center"
					label="应付下级"
				>
					<template slot="header" slot-scope="{ column, $index }">
						<span>
							应付下级
							<el-tooltip
								class="item"
								effect="dark"
								content="汇总当期应付下级的总额"
								placement="top-start"
							>
								<i class="el-icon-question"></i>
							</el-tooltip>
						</span>
					</template>
					<template slot-scope="scope">
						<span>
							{{
								handleNumber(
									'USDT',
									Math.abs(
										scope.row.shouldPaymentChildAmount
									),
									2
								)
							}}
						</span>
					</template>
				</el-table-column>
				<el-table-column
					prop="personShouldReceiptPaymentAmount"
					align="center"
					label="本期个人应收"
				>
					<template slot="header" slot-scope="{ column, $index }">
						<span>
							{{
								curData.personShouldReceiptPaymentAmount < 0
									? '本期个人应付'
									: '本期个人应收'
							}}
						</span>
						<el-tooltip
							class="item"
							effect="dark"
							content=""
							placement="top-start"
						>
							<span slot="content">
								<p
									v-if="
										curData.personShouldReceiptPaymentAmount <
										0
									"
								>
									当期应收总额减去应付总额的差值；差值为负数时表示亏损
									公式：应收上级+应收下级-应付上级-应付下级
								</p>
								<p v-else>
									当期应收总额减去应付总额的差值；差值为正数时表示盈利
									公式：应收上级+应收下级-应付上级-应付下级
								</p>
							</span>
							<i class="el-icon-question"></i>
						</el-tooltip>
					</template>
					<template slot-scope="scope">
						<span>
							{{
								handleNumber(
									'USDT',
									Math.abs(
										scope.row
											.personShouldReceiptPaymentAmount
									),
									2
								)
							}}
						</span>
					</template>
				</el-table-column>
			</el-table>
			<div class="tabs">
				<el-tabs
					v-model="activeName"
					type="card"
					@tab-click="handleClick"
				>
					<el-tab-pane
						:label="typeStr + '上级'"
						name="1"
					></el-tab-pane>
					<el-tab-pane label="应收下级" name="2"></el-tab-pane>
					<el-tab-pane label="应付下级" name="3"></el-tab-pane>
				</el-tabs>
			</div>
			<div class="contentBox mt20" v-if="activeName == 1">
				本期代理团队{{ typeStr }}上级明细
			</div>
			<div class="contentBox mt20" v-if="activeName == 2">
				应收下级明细
			</div>
			<div class="contentBox mt20" v-if="activeName == 3">
				应付下级明细
			</div>
			<div class="childer-box">
				<div class="silder" v-if="activeName !== '1'">
					<div class="row">
						全部合计{{ paymentStr }}:{{
							this.paymentStatus == 1
								? handleNumber(
										'USDT',
										Math.abs(
											curData.shouldReceiptChildAmount
										),
										2
								  )
								: handleNumber(
										'USDT',
										Math.abs(
											curData.shouldPaymentChildAmount
										),
										2
								  )
						}}
					</div>
					<div class="row">
						—— 上级代理 {{ curData.proxyName || '' }}
					</div>
					<div class="row display-tow">
						<span>
							下级代理({{ paymentStr }}
							<span>
								{{
									handleNumber(
										'USDT',
										Math.abs(agentAmount),
										2
									)
								}}
							</span>
							)
						</span>
						<span
							class="switch"
							@click="agentListSwitch = !agentListSwitch"
						>
							{{ agentListSwitch ? '-' : '+' }}
						</span>
					</div>
					<div class="lower-user" v-if="agentListSwitch">
						<div
							v-loading="loadDataAgentLoading"
							class="list"
							v-for="(item, index) in agentList"
							:class="{
								active:
									listIndex1 == 0 && agentListIndex == index
							}"
							@click="getAgentChildrenData(item, index)"
							:key="index"
						>
							{{ item.proxyName }}（{{ paymentStr }}:
							<span>
								{{
									handleNumber(
										'USDT',
										Math.abs(
											item.shouldReceiptPaymentParentAmount
										),
										2
									)
								}}
							</span>
							）
						</div>
						<div
							style="color: rgb(2, 167, 240); cursor: pointer"
							@click="addAgentPage()"
							v-if="
								agentTotalPage > 0 && agentTotalPage > agentPage
							"
						>
							更多 >>
						</div>
					</div>
					<div class="row display-tow">
						<span>
							下级会员({{ paymentStr }}
							<span>
								{{
									handleNumber(
										'USDT',
										Math.abs(memberAmount),
										2
									)
								}}
							</span>
							)
						</span>
						<span
							class="switch"
							@click="memberListSwitch = !memberListSwitch"
						>
							{{ memberListSwitch ? '-' : '+' }}
						</span>
					</div>
					<div class="lower-user" v-if="memberListSwitch">
						<div
							v-loading="loadDataMemberLoading"
							class="list"
							v-for="(item, index) in memberList"
							:class="{
								active:
									listIndex1 == 1 && memberListIndex == index
							}"
							@click="getMemberChildrenData(item, index)"
							:key="index"
						>
							{{ item.memberName }}（{{ paymentStr }}:
							<span>
								{{
									handleNumber(
										'USDT',
										Math.abs(
											item.shouldPaymentReceiptParentAmount
										),
										2
									)
								}}
							</span>
							）
						</div>
						<div
							style="color: rgb(2, 167, 240); cursor: pointer"
							@click="addMemberPage()"
							v-if="
								memberTotalPage > 0 &&
								memberTotalPage > memberPage
							"
						>
							更多 >>
						</div>
					</div>
				</div>
				<div
					v-if="listIndex1 == 0 && dialogTableData.length"
					class="table-content"
					:style="{ width: activeName !== '1' ? '75%' : '100%' }"
				>
					<el-table
						v-loading="loading"
						element-loading-spinner="el-icon-loading"
						size="mini"
						class="small-size-table"
						:data="dialogTableData"
						style="width: 100%; margin: 15px 0"
						:header-cell-style="getRowClass"
						highlight-current-row
					>
						<el-table-column
							v-if="activeName !== '1'"
							prop="teamNetAmount"
							align="center"
							label="下级代理"
						>
							<template slot-scope="scope">
								<span>
									{{ scope.row.proxyName }}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="teamNetAmount"
							align="center"
							label="本期团队盈亏"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									本期团队盈亏
									<el-tooltip
										class="item"
										effect="dark"
										content="汇总德州+体育+真人+电竞+棋牌+彩票+电子+其他八个项目的盈亏之和"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row.teamNetAmount
										)
									"
								>
									{{
										handleNumber(
											'USDT',
											scope.row.teamNetAmount,
											2
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="adjustmentAmount"
							align="center"
							label="其他资金变动"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									其他资金变动
									<el-tooltip
										class="item"
										effect="dark"
										placement="top-start"
									>
										<span slot="content">
											统计非游戏盈亏类目的资金增减变动
										</span>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row.adjustmentAmount
										)
									"
								>
									{{
										handleNumber(
											'USDT',
											scope.row.adjustmentAmount,
											2
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="lastPeriodShouldReceiptPaymentParentAmount"
							align="center"
							label="上期应收上级"
						>
							<template slot-scope="scope">
								<span
									v-if="
										scope.row
											.lastPeriodShouldReceiptPaymentParentAmount >
										0
									"
								>
									{{
										handleNumber(
											'USDT',
											Math.abs(
												scope.row
													.lastPeriodShouldReceiptPaymentParentAmount
											),
											2
										)
									}}
								</span>
								<span v-else>$0.00</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="lastPeriodShouldReceiptPaymentParentAmount"
							align="center"
							label="上期应付上级"
						>
							<template slot-scope="scope">
								<span
									v-if="
										scope.row
											.lastPeriodShouldReceiptPaymentParentAmount <
										0
									"
								>
									{{
										handleNumber(
											'USDT',
											Math.abs(
												scope.row
													.lastPeriodShouldReceiptPaymentParentAmount
											),
											2
										)
									}}
								</span>
								<span v-else>$0.00</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="shouldReceiptPaymentParentAmount"
							align="center"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span v-if="dialogTableData.length">
									{{
										dialogTableData[0]
											.shouldReceiptPaymentParentAmount <
										0
											? '应付上级'
											: '应收上级'
									}}
									<!-- <el-tooltip
									class="item"
									effect="dark"
									content="本期团队盈亏+其他资金变动+上期应收上级+上期应付上级＞0的金额"
									placement="top-start"
								>
									<i class="el-icon-question"></i>
								</el-tooltip> -->
								</span>
								<span>
									<el-tooltip
										class="item"
										effect="dark"
										content="本期团队盈亏+其他资金变动+上期应收上级-上期应付上级＞0的金额"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<span>
									{{
										handleNumber(
											'USDT',
											Math.abs(
												scope.row
													.shouldReceiptPaymentParentAmount
											),
											2
										)
									}}
								</span>
							</template>
						</el-table-column>
					</el-table>
					<div class="contentBox mt30 flex-between">
						<div>
							本期团队盈亏：
							<span
								v-if="dialogTableData.length"
								:style="
									handleNumberColor(
										dialogTableData[0].teamNetAmount
									)
								"
							>
								{{
									handleNumber(
										'USDT',
										dialogTableData[0].teamNetAmount,
										2
									)
								}}
							</span>
						</div>
						<div
							v-if="
								dialogTableData.length &&
								dialogTableData[0].zhanchengFlag != 0 &&
								dialogTableData[0]
									.zhanchengReceiptPaymentShowSwitch
							"
						>
							本期团队占成交收，{{
								dialogTableData[0]
									.teamZhanchengShouldReceiptPaymentParentAmount <
								0
									? '应付'
									: '应收'
							}}上级:
							<el-link
								class="lightBlueColor decoration"
								type="primary"
								@click="zhanchengVisible = true"
							>
								{{
									handleNumber(
										'USDT',
										Math.abs(
											dialogTableData[0]
												.teamZhanchengShouldReceiptPaymentParentAmount
										),
										2
									)
								}}
							</el-link>
						</div>
					</div>
					<el-table
						v-loading="loading"
						element-loading-spinner="el-icon-loading"
						size="mini"
						class="small-size-table"
						:data="dialogTableData"
						style="width: 100%; margin: 15px 0"
						:header-cell-style="getRowClass"
						highlight-current-row
					>
						<el-table-column
							prop="dxClubNetAmount"
							align="center"
							label=""
						>
							<template slot-scope="scope">德州俱乐部</template>
						</el-table-column>
						<el-table-column
							prop="dxClubNetAmount"
							align="center"
							label="会员俱乐部游戏输赢"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									会员俱乐部游戏输赢
									<!-- <el-tooltip
									class="item"
									effect="dark"
									content="tip"
									placement="top-start"
								>
									<i class="el-icon-question"></i>
								</el-tooltip> -->
								</span>
							</template>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row.dxClubNetAmount
										)
									"
								>
									{{
										handleNumber(
											'USDT',
											scope.row.dxClubNetAmount,
											2
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="dxSquidNetAmount"
							align="center"
							label="会员鱿鱼游戏输赢"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									会员鱿鱼游戏输赢
									<!-- <el-tooltip
									class="item"
									effect="dark"
									content="tip"
									placement="top-start"
								>
									<i class="el-icon-question"></i>
								</el-tooltip> -->
								</span>
							</template>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row.dxSquidNetAmount
										)
									"
								>
									{{
										handleNumber(
											'USDT',
											scope.row.dxSquidNetAmount,
											2
										)
									}}
								</span>
							</template>
						</el-table-column>
						<!-- <el-table-column
						prop="serviceChargeHandAmount"
						align="center"
						label="会员手牌服务费"
					>
						<template slot="header" slot-scope="{ column, $index }">
							<span>
								会员手牌服务费
								<el-tooltip
									class="item"
									effect="dark"
									content="汇总会员被收取的手牌服务费之和"
									placement="top-start"
								>
									<i class="el-icon-question"></i>
								</el-tooltip>
							</span>
						</template>
						<template slot-scope="scope">
							<span :style="handleNumberColor(scope.row.serviceChargeHandAmount)">
								{{handleNumber('USDT',scope.row.serviceChargeHandAmount,2)}}
							</span>
						</template>
					</el-table-column> -->
						<el-table-column
							prop="serviceChargeRoundAmount"
							align="center"
							label="会员局服务费"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									会员局服务费
									<el-tooltip
										class="item"
										effect="dark"
										content="汇总会员被收取的局服务费之和"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row.serviceChargeRoundAmount
										)
									"
								>
									{{
										handleNumber(
											'USDT',
											scope.row.serviceChargeRoundAmount,
											2
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="serviceChargeContributionRebateAmount"
							align="center"
							label="服务费贡献分成"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									服务费贡献分成
									<el-tooltip
										class="item"
										effect="dark"
										content="统计当期获得的俱乐部服务费贡献的分成金额公式：俱乐部服务费贡献*团队分成比例；公式仅作参考测算，测算结果不等同实际发放金额"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row
												.serviceChargeContributionRebateAmount
										)
									"
								>
									{{
										handleNumber(
											'USDT',
											scope.row
												.serviceChargeContributionRebateAmount,
											2
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="dxClubTeamNetAmount"
							align="center"
							label="团队盈亏"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									团队盈亏
									<el-tooltip
										class="item"
										effect="dark"
										content="公式=会员俱乐部游戏输赢+会员鱿鱼游戏输赢+会员局服务费+服务费贡献分成"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row.dxClubTeamNetAmount
										)
									"
								>
									{{
										handleNumber(
											'USDT',
											scope.row.dxClubTeamNetAmount,
											2
										)
									}}
								</span>
							</template>
						</el-table-column>
					</el-table>
					<el-table
						v-loading="loading"
						element-loading-spinner="el-icon-loading"
						size="mini"
						class="small-size-table"
						:data="dialogTableData2"
						style="width: 100%; margin: 15px 0"
						:header-cell-style="getRowClass"
						highlight-current-row
					>
						<el-table-column
							prop="dxClubNetAmount"
							align="center"
							label=""
						>
							<template slot-scope="scope">
								{{ scope.row.label }}
							</template>
						</el-table-column>
						<el-table-column
							prop="tableData1"
							align="center"
							label="保险投注输赢"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									保险投注输赢
									<!-- <el-tooltip
									class="item"
									effect="dark"
									content="tip"
									placement="top-start"
								>
									<i class="el-icon-question"></i>
								</el-tooltip> -->
								</span>
							</template>
							<template slot-scope="scope">
								<span
									v-if="scope.row.tableData1 != '/'"
									:style="
										handleNumberColor(scope.row.tableData1)
									"
								>
									{{
										handleNumber(
											'USDT',
											scope.row.tableData1,
											2
										)
									}}
								</span>
								<span v-else>/</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="tableData2"
							align="center"
							label="代理保险分成"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									代理保险分成
									<el-tooltip
										class="item"
										effect="dark"
										content="	统计当期获得的会员保险投注输赢的分成金额
公式：-（保险投注输赢*团队分成比例）；公式仅作参考测算，测算结果不等同实际发放金额"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<span
									v-if="scope.row.tableData2 != '/'"
									:style="
										handleNumberColor(scope.row.tableData2)
									"
								>
									{{
										handleNumber(
											'USDT',
											scope.row.tableData2,
											2
										)
									}}
								</span>
								<span v-else>/</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="tableData3"
							align="center"
							label="会员增值服务消费"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									会员增值服务消费
									<el-tooltip
										class="item"
										effect="dark"
										content="会员在德州场馆内因增值服务、商城、返利等功能引起的资金变动。"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<span
									v-if="scope.row.tableData3 != '/'"
									:style="
										handleNumberColor(scope.row.tableData3)
									"
								>
									{{
										handleNumber(
											'USDT',
											scope.row.tableData3,
											2
										)
									}}
								</span>
								<span v-else>/</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="tableData4"
							align="center"
							label="增值服务消费分成"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									增值服务消费分成
									<el-tooltip
										class="item"
										effect="dark"
										content="统计当期获得的会员增值服务消费的分成金额。"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<span
									v-if="scope.row.tableData4 != '/'"
									:style="
										handleNumberColor(scope.row.tableData4)
									"
								>
									{{
										handleNumber(
											'USDT',
											scope.row.tableData4,
											2
										)
									}}
								</span>
								<span v-else>/</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="tableData5"
							align="center"
							label="团队盈亏"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									团队盈亏
									<el-tooltip
										class="item"
										effect="dark"
										content="公式：保险投注输赢+代理保险分成+会员增值服务消费+增值服务消费分成"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<span
									v-if="scope.row.tableData5 != '/'"
									:style="
										handleNumberColor(scope.row.tableData5)
									"
								>
									{{
										handleNumber(
											'USDT',
											scope.row.tableData5,
											2
										)
									}}
								</span>
								<span v-else>/</span>
							</template>
						</el-table-column>
					</el-table>
					<el-table
						v-loading="loading"
						element-loading-spinner="el-icon-loading"
						size="mini"
						class="small-size-table"
						:data="dialogTableData"
						style="width: 100%; margin: 15px 0"
						:header-cell-style="getRowClass"
						highlight-current-row
					>
						<el-table-column
							prop="serviceChargeContributionAmount"
							align="center"
							label=""
						>
							<template slot-scope="scope">德州场馆</template>
						</el-table-column>
						<el-table-column
							prop="serviceChargeContributionAmount"
							align="center"
							label="俱乐部服务费贡献"
						>
							<template slot-scope="scope">
								{{
									handleNumber(
										'USDT',
										scope.row
											.serviceChargeContributionAmount,
										2
									)
								}}
							</template>
						</el-table-column>
						<el-table-column
							prop="dxInsureBetAmount"
							align="center"
							label="保险投注金额"
						>
							<template slot-scope="scope">
								{{
									handleNumber(
										'USDT',
										scope.row.dxInsureBetAmount,
										2
									)
								}}
							</template>
						</el-table-column>
						<el-table-column
							prop="dxInsureValidBetAmount"
							align="center"
							label="保险有效投注"
						>
							<template slot-scope="scope">
								{{
									handleNumber(
										'USDT',
										scope.row.dxInsureValidBetAmount,
										2
									)
								}}
							</template>
						</el-table-column>
					</el-table>
					<el-table
						v-loading="loading"
						element-loading-spinner="el-icon-loading"
						size="mini"
						class="small-size-table"
						:data="dialogTableData1"
						style="width: 100%; margin: 15px 0"
						:header-cell-style="getRowClass"
						highlight-current-row
					>
						<el-table-column
							prop="userName"
							align="center"
							label=""
						>
							<template slot-scope="scope">
								{{ scope.row.label }}
							</template>
						</el-table-column>
						<el-table-column
							prop="listData1"
							align="center"
							label="会员游戏输赢"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									会员游戏输赢
									<!-- <el-tooltip
									class="item"
									effect="dark"
									content="tip"
									placement="top-start"
								>
									<i class="el-icon-question"></i>
								</el-tooltip> -->
								</span>
							</template>
							<template slot-scope="scope">
								<span
									v-if="scope.row.listData1 != '/'"
									:style="
										handleNumberColor(scope.row.listData1)
									"
								>
									{{
										handleNumber(
											'USDT',
											scope.row.listData1,
											2
										)
									}}
								</span>
								<span v-else>/</span>
							</template>
						</el-table-column>
						<!-- <el-table-column
						prop="listData2"
						align="center"
						label="游戏输赢分摊"
						v-if="
							dialogTableData.length &&
							dialogTableData[0].zhanchengFlag != 0
						"
					>
						<template slot="header" slot-scope="{ column, $index }">
							<span>
								游戏输赢分摊
								<el-tooltip
									class="item"
									effect="dark"
									content="计算因为占成而需要分摊的盈亏金额;公式：-（会员游戏输赢*团队占成比例）"
									placement="top-start"
								>
									<i class="el-icon-question"></i>
								</el-tooltip>
							</span>
						</template>
						<template slot-scope="scope">
							<span
								v-if="scope.row.listData2 != '/'"
								:style="handleNumberColor(scope.row.listData2)"
							>
								{{
									handleNumber('USDT', scope.row.listData2, 2)
								}}
							</span>
							<span v-else>/</span>
						</template>
					</el-table-column> -->
						<el-table-column
							prop="listData7"
							align="center"
							label="输赢重算调整"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									输赢重算调整
									<el-tooltip
										class="item"
										effect="dark"
										content="统计当期因注单重算而导致的输赢金额调整"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<span
									v-if="scope.row.listData7 != '/'"
									:style="
										handleNumberColor(scope.row.listData7)
									"
								>
									{{
										handleNumber(
											'USDT',
											scope.row.listData7,
											2
										)
									}}
								</span>
								<span v-else>/</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="listData3"
							align="center"
							label="有效投注返点"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									有效投注返点
									<el-tooltip
										class="item"
										effect="dark"
										content="统计当期获得的有效投注返点金额; 公式：有效投注*团队返点比例；公式仅作参考测算，测算结果不等同实际发放金额"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<span
									v-if="scope.row.listData3 != '/'"
									:style="
										handleNumberColor(scope.row.listData3)
									"
								>
									{{
										handleNumber(
											'USDT',
											scope.row.listData3,
											2
										)
									}}
								</span>
								<span v-else>/</span>
							</template>
						</el-table-column>
						<!-- <el-table-column
						prop="listData4"
						align="center"
						label="团队返点分摊"
						v-if="
							dialogTableData.length &&
							dialogTableData[0].zhanchengFlag != 0
						"
					>
						<template slot="header" slot-scope="{ column, $index }">
							<span>
								团队返点分摊
								<el-tooltip
									class="item"
									effect="dark"
									content="根据当期获得的有效投注返点金额计算出因为占成而需要分摊的返点金额; 公式：-（有效投注返点*团队占成比例）"
									placement="top-start"
								>
									<i class="el-icon-question"></i>
								</el-tooltip>
							</span>
						</template>
						<template slot-scope="scope">
							<span
								v-if="scope.row.listData4 != '/'"
								:style="handleNumberColor(scope.row.listData4)"
							>
								{{
									handleNumber('USDT', scope.row.listData4, 2)
								}}
							</span>
							<span v-else>/</span>
						</template>
					</el-table-column> -->
						<el-table-column
							prop="listData8"
							align="center"
							label="返点重算调整"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									返点重算调整
									<el-tooltip
										class="item"
										effect="dark"
										content="统计当期因注单重算而导致的返点金额调整"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<span
									v-if="scope.row.listData8 != '/'"
									:style="
										handleNumberColor(scope.row.listData8)
									"
								>
									{{
										handleNumber(
											'USDT',
											scope.row.listData8,
											2
										)
									}}
								</span>
								<span v-else>/</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="listData5"
							align="center"
							label="其他收支项"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									其他收支项
									<el-tooltip
										class="item"
										effect="dark"
										content="统计日期内会员的其他收支项，包含：真人打赏、电子活动奖金"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<span
									v-if="scope.row.listData5 != '/'"
									:style="
										handleNumberColor(scope.row.listData5)
									"
								>
									{{
										handleNumber(
											'USDT',
											scope.row.listData5,
											2
										)
									}}
								</span>
								<span v-else>/</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="listData6"
							align="center"
							label="团队盈亏"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									团队盈亏
									<el-tooltip
										class="item"
										effect="dark"
										placement="top-start"
									>
										<div slot="content">
											<p
												v-if="
													dialogTableData.length &&
													dialogTableData[0]
														.zhanchengFlag != 0
												"
											>
												汇总其他三方场馆盈亏的总额
												<br />
												公式：会员游戏输赢+输赢重算调整+有效投注返点+返点重算调整+其他收支
											</p>
											<p v-else>
												汇总其他三方场馆盈亏的总额
												<br />
												公式：会员游戏输赢+输赢重算调整+有效投注返点+返点重算调整+其他收支
											</p>
										</div>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<span
									v-if="scope.row.listData6 != '/'"
									:style="
										handleNumberColor(scope.row.listData6)
									"
								>
									{{
										handleNumber(
											'USDT',
											scope.row.listData6,
											2
										)
									}}
								</span>
								<span v-else>/</span>
							</template>
						</el-table-column>
					</el-table>
					<el-table
						v-loading="loading"
						element-loading-spinner="el-icon-loading"
						size="mini"
						class="small-size-table"
						:data="dialogTableData"
						style="width: 100%; margin: 15px 0"
						:header-cell-style="getRowClass"
						highlight-current-row
					>
						<el-table-column
							prop="tyValidBetAmount"
							align="center"
							label=""
						>
							<template>有效投注</template>
						</el-table-column>
						<el-table-column
							prop="tyValidBetAmount"
							align="center"
							label="体育"
						>
							<template slot-scope="scope">
								<span>
									{{
										handleNumber(
											'USDT',
											scope.row.tyValidBetAmount,
											2
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="djValidBetAmount"
							align="center"
							label="电竞"
						>
							<template slot-scope="scope">
								<span>
									{{
										handleNumber(
											'USDT',
											scope.row.djValidBetAmount,
											2
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="qpValidBetAmount"
							align="center"
							label="棋牌"
						>
							<template slot-scope="scope">
								<span>
									{{
										handleNumber(
											'USDT',
											scope.row.qpValidBetAmount,
											2
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="cpValidBetAmount"
							align="center"
							label="彩票"
						>
							<template slot-scope="scope">
								<span>
									{{
										handleNumber(
											'USDT',
											scope.row.cpValidBetAmount,
											2
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="zrValidBetAmount"
							align="center"
							label="电子"
						>
							<template slot-scope="scope">
								<span>
									{{
										handleNumber(
											'USDT',
											scope.row.dyValidBetAmount,
											2
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="zrValidBetAmount"
							align="center"
							label="真人"
						>
							<template slot-scope="scope">
								<span>
									{{
										handleNumber(
											'USDT',
											scope.row.zrValidBetAmount,
											2
										)
									}}
								</span>
							</template>
						</el-table-column>
					</el-table>
					<el-table
						v-loading="loading"
						element-loading-spinner="el-icon-loading"
						size="mini"
						class="small-size-table"
						:data="dialogTableData"
						style="width: 100%; margin: 15px 0"
						:header-cell-style="getRowClass"
						highlight-current-row
					>
						<el-table-column
							prop="memberRebateAddAmount"
							align="center"
							label=""
						>
							<template slot-scope="scope">其他</template>
						</el-table-column>
						<el-table-column
							prop="memberRebateAddAmount"
							align="center"
							label="会员返水调整"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									会员返水调整
									<!-- <el-tooltip
									class="item"
									effect="dark"
									content="tip"
									placement="top-start"
								>
									<i class="el-icon-question"></i>
								</el-tooltip> -->
								</span>
							</template>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row.memberRebateAddAmount
										)
									"
								>
									{{
										handleNumber(
											'USDT',
											scope.row.memberRebateAddAmount,
											2
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="memberAccountAdjustmentAmount"
							align="center"
							label="会员账户调整"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									会员账户调整
									<!-- <el-tooltip
									class="item"
									effect="dark"
									content="tip"
									placement="top-start"
								>
									<i class="el-icon-question"></i>
								</el-tooltip> -->
								</span>
							</template>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row
												.memberAccountAdjustmentAmount
										)
									"
								>
									{{
										handleNumber(
											'USDT',
											scope.row
												.memberAccountAdjustmentAmount,
											2
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="proxyIncomeAmount"
							align="center"
							label="代理收入调整"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									代理收入调整
									<!-- <el-tooltip
									class="item"
									effect="dark"
									content="tip"
									placement="top-start"
								>
									<i class="el-icon-question"></i>
								</el-tooltip> -->
								</span>
							</template>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row.proxyIncomeAmount
										)
									"
								>
									{{
										handleNumber(
											'USDT',
											scope.row.proxyIncomeAmount,
											2
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="proxyAccountAdjustmentAmount"
							align="center"
							label="代理账户调整"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									代理账户调整
									<!-- <el-tooltip
									class="item"
									effect="dark"
									content="tip"
									placement="top-start"
								>
									<i class="el-icon-question"></i>
								</el-tooltip> -->
								</span>
							</template>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row
												.proxyAccountAdjustmentAmount
										)
									"
								>
									{{
										handleNumber(
											'USDT',
											scope.row
												.proxyAccountAdjustmentAmount,
											2
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="otherNetAmount"
							align="center"
							label="其他盈亏总计"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									其他盈亏总计
									<el-tooltip
										class="item"
										effect="dark"
										placement="top-start"
									>
										<div slot="content">
											汇总其他盈亏总额
											<br />
											公式：会员返水调整+会员账户调整+代理收入调整+代理账户调整
										</div>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row.otherNetAmount
										)
									"
								>
									{{
										handleNumber(
											'USDT',
											scope.row.otherNetAmount,
											2
										)
									}}
								</span>
							</template>
						</el-table-column>
					</el-table>
					<DarkWaterRed
						v-if="curData.proxyLevel == 0"
						label="本期分红"
						:startDate="curData.cycleStartDate"
						:endDate="curData.cycleEndDate"
						:proxyId="curData.proxyId"
					/>
					<div class="contentBox mt30">
						其他资金变动：
						<span
							v-if="
								dialogTableData.length &&
								dialogTableData[0].proxyLevel == 0
							"
							:style="
								handleNumberColor(
									dialogTableData[0]
										.platformOtherAdjustmentTotalAmount
								)
							"
						>
							{{
								handleNumber(
									'USDT',
									dialogTableData[0]
										.platformOtherAdjustmentTotalAmount,
									2
								)
							}}
						</span>
						<span
							v-if="
								dialogTableData.length &&
								dialogTableData[0].proxyLevel != 0
							"
							:style="
								handleNumberColor(
									dialogTableData[0]
										.childProxyOtherAdjustmentTotalAmount
								)
							"
						>
							{{
								handleNumber(
									'USDT',
									dialogTableData[0]
										.childProxyOtherAdjustmentTotalAmount,
									2
								)
							}}
						</span>
					</div>
					<el-table
						v-loading="loading"
						element-loading-spinner="el-icon-loading"
						size="mini"
						class="small-size-table"
						:data="dialogTableData"
						style="width: 100%; margin: 15px 0"
						:header-cell-style="getRowClass"
						highlight-current-row
					>
						<el-table-column
							prop="platformCashUpAmount"
							align="center"
							v-if="
								dialogTableData.length &&
								dialogTableData[0].proxyLevel == 0
							"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									平台现金上分
									<el-tooltip
										class="item"
										effect="dark"
										content="统计当期被平台现金充值上分的总额"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row.platformCashUpAmount
										)
									"
								>
									{{
										handleNumber(
											'USDT',
											scope.row.platformCashUpAmount,
											2
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="platformCashDownAmount"
							align="center"
							label="平台现金下分"
							v-if="
								dialogTableData.length &&
								dialogTableData[0].proxyLevel == 0
							"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									平台现金下分
									<el-tooltip
										class="item"
										effect="dark"
										content="统计当期被平台现金提现下分的总额"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row.platformCashDownAmount
										)
									"
								>
									{{
										handleNumber(
											'USDT',
											scope.row.platformCashDownAmount,
											2
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="parentCashUpAmount"
							align="center"
							c
							v-if="
								dialogTableData.length &&
								dialogTableData[0].proxyLevel !== 0
							"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									上级给下级充值
									<el-tooltip
										class="item"
										effect="dark"
										content="统计当期被上级现金充值上分的总额"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row.parentCashUpAmount
										)
									"
								>
									{{
										handleNumber(
											'USDT',
											scope.row.parentCashUpAmount,
											2
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="parentCashDownAmount"
							align="center"
							label="上级给下级提现"
							v-if="
								dialogTableData.length &&
								dialogTableData[0].proxyLevel !== 0
							"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									上级给下级提现
									<el-tooltip
										class="item"
										effect="dark"
										content="统计当期被上级现金提现下分的总额"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row.parentCashDownAmount
										)
									"
								>
									{{
										handleNumber(
											'USDT',
											scope.row.parentCashDownAmount,
											2
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="parentCreditRepaymentAmount"
							align="center"
							v-if="
								dialogTableData.length &&
								dialogTableData[0].proxyLevel !== 0
							"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									上级帮下级还款
									<el-tooltip
										class="item"
										effect="dark"
										content="统计当期被上级现金或信用还款的总额"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row
												.parentCreditRepaymentAmount
										)
									"
								>
									{{
										handleNumber(
											'USDT',
											scope.row
												.parentCreditRepaymentAmount,
											2
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="platformOtherAdjustmentTotalAmount"
							align="center"
							label="其他资金变动总计"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									其他资金变动总计
									<el-tooltip
										class="item"
										effect="dark"
										placement="top-start"
									>
										<div slot="content">
											统计非游戏盈亏类目的资金增减变动
											<br />
											<p
												v-if="
													dialogTableData[0]
														.proxyLevel == 0
												"
											>
												公式：平台现金上分+平台现金下分
											</p>

											<p
												v-if="
													dialogTableData[0]
														.proxyLevel != 0
												"
											>
												公式：上级给下级充值上分+上级给下级提现下分+上级帮下级还款
											</p>
										</div>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<span
									v-if="dialogTableData[0].proxyLevel == 0"
									:style="
										handleNumberColor(
											scope.row
												.platformOtherAdjustmentTotalAmount
										)
									"
								>
									{{
										handleNumber(
											'USDT',
											scope.row
												.platformOtherAdjustmentTotalAmount,
											2
										)
									}}
								</span>
								<span
									v-if="dialogTableData[0].proxyLevel != 0"
									:style="
										handleNumberColor(
											scope.row
												.childProxyOtherAdjustmentTotalAmount
										)
									"
								>
									{{
										handleNumber(
											'USDT',
											scope.row
												.childProxyOtherAdjustmentTotalAmount,
											2
										)
									}}
								</span>
							</template>
						</el-table-column>
					</el-table>
				</div>
				<div
					v-if="listIndex1 == 1"
					class="table-content"
					:style="{ width: activeName !== '1' ? '75%' : '100%' }"
				>
					<el-table
						v-loading="loading"
						element-loading-spinner="el-icon-loading"
						size="mini"
						class="small-size-table"
						:data="data"
						style="width: 100%; margin: 15px 0"
						:header-cell-style="getRowClass"
						highlight-current-row
					>
						<el-table-column align="center" label="下级会员">
							{{ memberCurData.memberName }}
						</el-table-column>
						<el-table-column prop="userName" align="center">
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									本期盈亏
									<el-tooltip
										class="item"
										effect="dark"
										content="汇总德州+体育+真人+电竞+棋牌+彩票+电子+其他八个项目的盈亏之和"
										placement="top"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<span
								:style="
									handleNumberColor(memberCurData.netAmount)
								"
							>
								{{
									handleTotalNumber(
										'USDT',
										memberCurData.netAmount,
										2,
										true,
										true
									)
								}}
							</span>
						</el-table-column>
						<el-table-column
							prop="userName"
							align="center"
							label="其他资金变动"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									其他资金变动
									<el-tooltip
										class="item"
										effect="dark"
										placement="top"
									>
										<span slot="content">
											统计非游戏盈亏类目的资金增减变动
										</span>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<span
								:style="
									handleNumberColor(
										memberCurData.adjustmentAmount
									)
								"
							>
								{{
									handleTotalNumber(
										'USDT',
										memberCurData.adjustmentAmount,
										2,
										true,
										true
									)
								}}
							</span>
						</el-table-column>
						<el-table-column prop="userName" align="center">
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>上期应收上级</span>
							</template>
							<span
								v-if="
									memberCurData.lastPeriodShouldReceiptPaymentParentAmount >
									0
								"
							>
								{{
									handleTotalNumber(
										'USDT',
										Math.abs(
											memberCurData.lastPeriodShouldReceiptPaymentParentAmount
										),
										2
									)
								}}
							</span>
							<span v-else>$0.00</span>
						</el-table-column>
						<el-table-column prop="userName" align="center">
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>上期应付上级</span>
							</template>
							<span
								v-if="
									memberCurData.lastPeriodShouldReceiptPaymentParentAmount <
									0
								"
							>
								{{
									handleTotalNumber(
										'USDT',
										Math.abs(
											memberCurData.lastPeriodShouldReceiptPaymentParentAmount
										),
										2
									)
								}}
							</span>
							<span v-else>$0.00</span>
						</el-table-column>
						<el-table-column prop="userName" align="center">
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									{{
										memberCurData.shouldPaymentReceiptParentAmount <
										0
											? '应付上级'
											: '应收上级'
									}}
								</span>
								<el-tooltip
									class="item"
									effect="dark"
									placement="top"
								>
									<p
										slot="content"
										v-if="
											memberCurData.shouldPaymentReceiptParentAmount <
											0
										"
									>
										本期盈亏+其他资金变动+上期应收上级-上期应付上级＜0的金额
									</p>
									<p slot="content" v-else>
										本期盈亏+其他资金变动+上期应收上级-上期应付上级＞0的金额
									</p>
									<i class="el-icon-question"></i>
								</el-tooltip>
							</template>
							<span>
								{{
									handleTotalNumber(
										'USDT',
										Math.abs(
											memberCurData.shouldPaymentReceiptParentAmount
										),
										2
									)
								}}
							</span>
						</el-table-column>
					</el-table>

					<div class="contentBox mt30">
						本期盈亏：
						<span
							:style="handleNumberColor(memberCurData.netAmount)"
						>
							{{
								handleTotalNumber(
									'USDT',
									memberCurData.netAmount,
									2,
									true,
									true
								)
							}}
						</span>
					</div>
					<el-table
						v-loading="loading"
						element-loading-spinner="el-icon-loading"
						size="mini"
						class="small-size-table"
						:data="data"
						style="width: 100%; margin: 15px 0"
						:header-cell-style="getRowClass"
						highlight-current-row
					>
						<el-table-column
							prop="dxClubNetAmount"
							align="center"
							label=""
						>
							<template slot-scope="scope">德州场馆</template>
						</el-table-column>
						<el-table-column
							prop="dxClubNetAmount"
							align="center"
							label="俱乐部游戏输赢"
						>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row.dxClubNetAmount
										)
									"
								>
									{{
										handleTotalNumber(
											'USDT',
											scope.row.dxClubNetAmount,
											2,
											true,
											true
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="dxSquidNetAmount"
							align="center"
							label="鱿鱼游戏输赢"
						>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row.dxSquidNetAmount
										)
									"
								>
									{{
										handleTotalNumber(
											'USDT',
											scope.row.dxSquidNetAmount,
											2,
											true,
											true
										)
									}}
								</span>
							</template>
						</el-table-column>
						<!-- <el-table-column
						prop="serviceChargeHandAmount"
						align="center"
						label="手牌服务费"
					>
						<template slot="header" slot-scope="{ column, $index }">
							<span>
								手牌服务费
								<el-tooltip
									class="item"
									effect="dark"
									content="会员被收取的手牌服务费之和"
									placement="top"
								>
									<i class="el-icon-question"></i>
								</el-tooltip>
							</span>
						</template>
						<template slot-scope="scope">
							<span :style="handleNumberColor(scope.row.serviceChargeHandAmount)">
							{{
								handleTotalNumber('USDT', scope.row.serviceChargeHandAmount, 2, true, true)
							}}
							</span>
						</template>
					</el-table-column> -->
						<el-table-column
							prop="serviceChargeRoundAmount"
							align="center"
							label="局服务费"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									局服务费
									<el-tooltip
										class="item"
										effect="dark"
										content="会员被收取的局服务费之和"
										placement="top"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row.serviceChargeRoundAmount
										)
									"
								>
									{{
										handleTotalNumber(
											'USDT',
											scope.row.serviceChargeRoundAmount,
											2,
											true,
											true
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="dxInsureNetAmount"
							align="center"
							label="保险投注输赢"
						>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row.dxInsureNetAmount
										)
									"
								>
									{{
										handleTotalNumber(
											'USDT',
											scope.row.dxInsureNetAmount,
											2,
											true,
											true
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="valueAddedTotalAmount"
							align="center"
							width="200px"
							label="增值服务消费"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									增值服务消费
									<el-tooltip
										class="item"
										effect="dark"
										content="会员在德州场馆内因增值服务、商城、返利等功能引起的资金变动。"
										placement="top"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row.valueAddedTotalAmount
										)
									"
								>
									{{
										handleTotalNumber(
											'USDT',
											scope.row.valueAddedTotalAmount,
											2,
											true,
											true
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="rebateAmount"
							align="center"
							label="返水金额"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									返水金额
									<el-tooltip
										class="item"
										effect="dark"
										content="统计当期获得的返水金额; 公式：服务费贡献*返水比例；公式仅作参考测算，测算结果不等同实际发放金额"
										placement="top"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row.rebateAmount
										)
									"
								>
									{{
										handleTotalNumber(
											'USDT',
											scope.row.rebateAmount,
											2,
											true,
											true
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="dxMemberNetAmount"
							align="center"
							label="会员盈亏"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									会员盈亏
									<el-tooltip
										class="item"
										effect="dark"
										content="汇总德州场馆盈亏的总额; 公式：俱乐部游戏输赢+鱿鱼游戏输赢+局服务费+保险投注输赢+增值服务消费+返水金额"
										placement="top"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row.dxMemberNetAmount
										)
									"
								>
									{{
										handleTotalNumber(
											'USDT',
											scope.row.dxMemberNetAmount,
											2,
											true,
											true
										)
									}}
								</span>
							</template>
						</el-table-column>
					</el-table>
					<el-table
						v-loading="loading"
						element-loading-spinner="el-icon-loading"
						size="mini"
						class="small-size-table"
						:data="data"
						style="width: 100%; margin: 15px 0"
						:header-cell-style="getRowClass"
						highlight-current-row
					>
						<el-table-column
							prop="dxClubNetAmount"
							align="center"
							label=""
						>
							<template slot-scope="scope">德州场馆</template>
						</el-table-column>
						<el-table-column
							prop="serviceChargeContributionAmount"
							align="center"
							label="俱乐部服务费贡献"
						>
							<template slot-scope="scope">
								{{
									handleTotalNumber(
										'USDT',
										scope.row
											.serviceChargeContributionAmount
									)
								}}
							</template>
						</el-table-column>
						<el-table-column
							prop="dxInsureBetAmount"
							align="center"
							label="保险投注金额"
						>
							<template slot-scope="scope">
								{{
									handleTotalNumber(
										'USDT',
										scope.row.dxInsureBetAmount
									)
								}}
							</template>
						</el-table-column>
						<el-table-column
							prop="dxInsureValidBetAmount"
							align="center"
							label="保险有效投注"
						>
							<template slot-scope="scope">
								{{
									handleTotalNumber(
										'USDT',
										scope.row.dxInsureValidBetAmount
									)
								}}
							</template>
						</el-table-column>
					</el-table>
					<el-table
						v-loading="loading"
						element-loading-spinner="el-icon-loading"
						size="mini"
						class="small-size-table"
						:data="dialogTableData3"
						style="width: 100%; margin: 15px 0"
						:header-cell-style="getRowClass"
						highlight-current-row
					>
						<el-table-column
							prop="userName"
							align="center"
							label=""
						>
							<template slot-scope="scope">
								{{ scope.row.label }}
							</template>
						</el-table-column>
						<el-table-column
							prop="listData1"
							align="center"
							label="游戏输赢"
						>
							<template slot-scope="scope">
								<span
									v-if="scope.row.listData1 != '/'"
									:style="
										handleNumberColor(scope.row.listData1)
									"
								>
									{{
										handleTotalNumber(
											'USDT',
											scope.row.listData1,
											2,
											true,
											true
										)
									}}
								</span>
								<span v-else>/</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="listData5"
							align="center"
							label="输赢重算调整"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									输赢重算调整
									<el-tooltip
										class="item"
										effect="dark"
										content="由于注单重算引起的输赢金额变动差值"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<span
									v-if="scope.row.listData5 != '/'"
									:style="
										handleNumberColor(scope.row.listData5)
									"
								>
									{{
										handleNumber(
											'USDT',
											scope.row.listData5,
											2
										)
									}}
								</span>
								<span v-else>/</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="listData2"
							align="center"
							label="返水金额"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									返水金额
									<el-tooltip
										class="item"
										effect="dark"
										content="统计当期获得的返水金额; 公式：有效投注*返水比例；公式仅作参考测算，测算结果不等同实际发放金额"
										placement="top"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<span
									v-if="scope.row.listData2 != '/'"
									:style="
										handleNumberColor(scope.row.listData2)
									"
								>
									{{
										handleTotalNumber(
											'USDT',
											scope.row.listData2,
											2,
											true,
											true
										)
									}}
								</span>
								<span v-else>/</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="listData6"
							align="center"
							label="返点重算调整"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									返点重算调整
									<el-tooltip
										class="item"
										effect="dark"
										content="由于注单重算引起的代理返点金额变动差值"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<span
									v-if="scope.row.listData6 != '/'"
									:style="
										handleNumberColor(scope.row.listData6)
									"
								>
									{{
										handleNumber(
											'USDT',
											scope.row.listData6,
											2
										)
									}}
								</span>
								<span v-else>/</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="listData3"
							align="center"
							label="其他收支项"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									其他收支项
									<el-tooltip
										class="item"
										effect="dark"
										content="统计日期内会员的其他收支项，包含：真人打赏、电子活动奖金"
										placement="top"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<span
									v-if="scope.row.listData3 != '/'"
									:style="
										handleNumberColor(scope.row.listData3)
									"
								>
									{{
										handleTotalNumber(
											'USDT',
											scope.row.listData3,
											2,
											true,
											true
										)
									}}
								</span>
								<span v-else>/</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="listData4"
							align="center"
							label="会员盈亏"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									会员盈亏
									<el-tooltip
										class="item"
										effect="dark"
										content="汇总其他三方场馆盈亏的总额; 公式：会员游戏输赢+输赢重算调整+返水金额+返水重算调整+其他收支项"
										placement="top"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<span
									v-if="scope.row.listData4 != '/'"
									:style="
										handleNumberColor(scope.row.listData4)
									"
								>
									{{
										handleTotalNumber(
											'USDT',
											scope.row.listData4,
											2,
											true,
											true
										)
									}}
								</span>
								<span v-else>/</span>
							</template>
						</el-table-column>
					</el-table>
					<el-table
						v-loading="loading"
						element-loading-spinner="el-icon-loading"
						size="mini"
						class="small-size-table"
						:data="data"
						key="15485"
						style="width: 100%; margin: 15px 0"
						:header-cell-style="getRowClass"
						highlight-current-row
					>
						<el-table-column
							prop="userName"
							align="center"
							label=""
						>
							<template slot-scope="scope">有效投注</template>
						</el-table-column>
						<el-table-column
							prop="tyValidBetAmount"
							align="center"
							label="体育"
						>
							<template slot-scope="scope">
								{{
									handleTotalNumber(
										'USDT',
										scope.row.tyValidBetAmount
									)
								}}
							</template>
						</el-table-column>
						<el-table-column
							prop="djValidBetAmount"
							align="center"
							label="电竞"
						>
							<template slot-scope="scope">
								{{
									handleTotalNumber(
										'USDT',
										scope.row.djValidBetAmount
									)
								}}
							</template>
						</el-table-column>
						<el-table-column
							prop="qpValidBetAmount"
							align="center"
							label="棋牌"
						>
							<template slot-scope="scope">
								{{
									handleTotalNumber(
										'USDT',
										scope.row.qpValidBetAmount
									)
								}}
							</template>
						</el-table-column>
						<el-table-column
							prop="cpValidBetAmount"
							align="center"
							label="彩票"
						>
							<template slot-scope="scope">
								{{
									handleTotalNumber(
										'USDT',
										scope.row.cpValidBetAmount
									)
								}}
							</template>
						</el-table-column>
						<el-table-column
							prop="userName"
							align="center"
							label="电子"
						>
							<template slot-scope="scope">
								{{
									handleTotalNumber(
										'USDT',
										scope.row.dyValidBetAmount
									)
								}}
							</template>
						</el-table-column>
						<el-table-column
							prop="zrValidBetAmount"
							align="center"
							label="真人"
						>
							<template slot-scope="scope">
								{{
									handleTotalNumber(
										'USDT',
										scope.row.zrValidBetAmount
									)
								}}
							</template>
						</el-table-column>
					</el-table>
					<el-table
						v-loading="loading"
						element-loading-spinner="el-icon-loading"
						size="mini"
						class="small-size-table"
						:data="data"
						style="width: 100%; margin: 15px 0"
						:header-cell-style="getRowClass"
						highlight-current-row
					>
						<el-table-column
							prop="userName"
							align="center"
							label=""
						>
							<template slot-scope="scope">其他</template>
						</el-table-column>
						<el-table-column
							prop="rebateAdjustmentAmount"
							align="center"
							label="返水调整"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									返水调整
									<el-tooltip
										class="item"
										effect="dark"
										content="平台对返水金额进行增加或扣除调整的金额"
										placement="top"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row.rebateAdjustmentAmount
										)
									"
								>
									{{
										handleTotalNumber(
											'USDT',
											scope.row.rebateAdjustmentAmount,
											2,
											true,
											true
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="accountAdjustmentAmount"
							align="center"
							label="账户调整"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									账户调整
									<el-tooltip
										class="item"
										effect="dark"
										content="平台对账户进行增加或扣除调整的金额"
										placement="top"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row.accountAdjustmentAmount
										)
									"
								>
									{{
										handleTotalNumber(
											'USDT',
											scope.row.accountAdjustmentAmount,
											2,
											true,
											true
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="otherTotalNetAmount"
							align="center"
							label="其他盈亏总计"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									其他盈亏总计
									<el-tooltip
										class="item"
										effect="dark"
										placement="top"
									>
										<span slot="content">
											会员返水调整+会员账户调整
										</span>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row.otherTotalNetAmount
										)
									"
								>
									{{
										handleTotalNumber(
											'USDT',
											scope.row.otherTotalNetAmount,
											2,
											true,
											true
										)
									}}
								</span>
							</template>
						</el-table-column>
					</el-table>
					<div class="contentBox mt30">
						其他资金变动：
						<span
							:style="
								handleNumberColor(
									memberCurData.adjustmentAmount
								)
							"
						>
							{{
								handleTotalNumber(
									'USDT',
									memberCurData.adjustmentAmount,
									2,
									true,
									true
								)
							}}
						</span>
					</div>
					<el-table
						v-loading="loading"
						element-loading-spinner="el-icon-loading"
						size="mini"
						class="small-size-table"
						:data="data"
						key="asdhb23123"
						style="width: 100%; margin: 15px 0"
						:header-cell-style="getRowClass"
						highlight-current-row
					>
						<el-table-column
							prop="parentCashUpAmount"
							align="center"
							label="上级给会员充值"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									上级给会员充值
									<el-tooltip
										class="item"
										effect="dark"
										content="统计当期被上级现金充值上分的总额"
										placement="top"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row.parentCashUpAmount
										)
									"
								>
									{{
										handleTotalNumber(
											'USDT',
											scope.row.parentCashUpAmount,
											2,
											true,
											true
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="parentCashDownAmount"
							align="center"
							label="上级给会员提现"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									上级给会员充值
									<el-tooltip
										class="item"
										effect="dark"
										placement="top"
									>
										<span slot="content">
											统计当期被上级现金提现下分的总额
										</span>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row.parentCashDownAmount
										)
									"
								>
									{{
										handleTotalNumber(
											'USDT',
											scope.row.parentCashDownAmount,
											2,
											true,
											true
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="parentCreditRepaymentAmount"
							align="center"
							label="上级帮会员还款"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									上级帮会员还款
									<el-tooltip
										class="item"
										effect="dark"
										placement="top"
									>
										<span slot="content">
											统计当期被上级现金或信用还款的总额
										</span>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row
												.parentCreditRepaymentAmount
										)
									"
								>
									{{
										handleTotalNumber(
											'USDT',
											scope.row
												.parentCreditRepaymentAmount,
											2,
											true,
											true
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="otherAdjustmentTotalAmount"
							align="center"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									其他资金变动总计
									<el-tooltip
										class="item"
										effect="dark"
										placement="top"
									>
										<span slot="content">
											统计非游戏盈亏类目的资金增减变动
											<br />
											公式：上级给会员充值+上级给会员提现+上级帮会员还款
										</span>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row.otherAdjustmentTotalAmount
										)
									"
								>
									{{
										handleTotalNumber(
											'USDT',
											scope.row
												.otherAdjustmentTotalAmount,
											2,
											true,
											true
										)
									}}
								</span>
							</template>
						</el-table-column>
					</el-table>
				</div>
			</div>
		</el-dialog>

		<!-- 占成详情弹窗 -->
		<el-dialog
			:visible.sync="zhanchengVisible"
			width="1200px"
			class=""
			:destroy-on-close="true"
			title="计算占成分摊后,本期团队占成交收"
		>
			<el-table
				v-loading="loading"
				element-loading-spinner="el-icon-loading"
				size="mini"
				class="small-size-table"
				:data="dialogTableData"
				style="width: 100%; margin: 15px 0"
				:header-cell-style="getRowClass"
				highlight-current-row
			>
				<el-table-column
					prop="teamNetAmount"
					align="center"
					label="代理账号"
				>
					<template slot-scope="scope">
						<span>
							{{ scope.row.proxyName }}
						</span>
					</template>
				</el-table-column>
				<el-table-column
					prop="dxVenueZhanchengReceiptPaymentAmount"
					align="center"
					label="德州场馆占成交收"
				>
					<template slot-scope="scope">
						<span
							:style="
								handleNumberColor(
									scope.row
										.dxVenueZhanchengReceiptPaymentAmount
								)
							"
						>
							{{
								handleNumber(
									'USDT',
									scope.row
										.dxVenueZhanchengReceiptPaymentAmount,
									2,
									true,
									true
								)
							}}
						</span>
					</template>
				</el-table-column>
				<el-table-column
					prop="otherVenueZhanchengReceiptPaymentAmount"
					align="center"
					label="其他场馆占成交收"
				>
					<template slot-scope="scope">
						<span
							:style="
								handleNumberColor(
									scope.row
										.otherVenueZhanchengReceiptPaymentAmount
								)
							"
						>
							{{
								handleNumber(
									'USDT',
									scope.row
										.otherVenueZhanchengReceiptPaymentAmount,
									2,
									true,
									true
								)
							}}
						</span>
					</template>
				</el-table-column>
				<el-table-column
					prop="otherZhanchengReceiptPaymentAmount"
					align="center"
					label="其他占成交收"
				>
					<template slot-scope="scope">
						<span
							:style="
								handleNumberColor(
									scope.row.otherZhanchengReceiptPaymentAmount
								)
							"
						>
							{{
								handleNumber(
									'USDT',
									scope.row
										.otherZhanchengReceiptPaymentAmount,
									2,
									true,
									true
								)
							}}
						</span>
					</template>
				</el-table-column>
				<el-table-column
					prop="teamZhanchengShouldReceiptPaymentParentAmount"
					align="center"
					label="本期团队占成交收总计"
				>
					<template slot="header" slot-scope="{ column, $index }">
						<span>
							本期团队占成交收总计
							<el-tooltip
								class="item"
								effect="dark"
								content="我的团队带入占成计算后的数值"
								placement="top-start"
							>
								<i class="el-icon-question"></i>
							</el-tooltip>
						</span>
					</template>
					<template slot-scope="scope">
						<span
							:style="
								handleNumberColor(
									scope.row
										.teamZhanchengShouldReceiptPaymentParentAmount
								)
							"
						>
							{{
								handleNumber(
									'USDT',
									scope.row
										.teamZhanchengShouldReceiptPaymentParentAmount,
									2,
									true,
									true
								)
							}}
						</span>
					</template>
				</el-table-column>
			</el-table>
			<div class="contentBox mt30">本期团队占成交收详情:</div>
			<el-table
				v-loading="loading"
				element-loading-spinner="el-icon-loading"
				size="mini"
				class="small-size-table"
				:data="dialogTableData"
				style="width: 100%; margin: 15px 0"
				:header-cell-style="getRowClass"
				highlight-current-row
				key="asdhb1478"
			>
				<el-table-column prop="teamNetAmount" align="center" label="">
					<template slot-scope="scope">德州俱乐部</template>
				</el-table-column>
				<el-table-column
					prop="dxClubNetAmount"
					align="center"
					label="会员俱乐部游戏输赢"
				>
					<template slot-scope="scope">
						<span
							:style="
								handleNumberColor(scope.row.dxClubNetAmount)
							"
						>
							{{
								handleNumber(
									'USDT',
									scope.row.dxClubNetAmount,
									2,
									true,
									true
								)
							}}
						</span>
					</template>
				</el-table-column>
				<el-table-column
					prop="dxSquidNetAmount"
					align="center"
					label="会员鱿鱼游戏输赢"
				>
					<template slot="header" slot-scope="{ column, $index }">
						<span>
							会员鱿鱼游戏输赢
							<!-- <el-tooltip
									class="item"
									effect="dark"
									content="tip"
									placement="top-start"
								>
									<i class="el-icon-question"></i>
								</el-tooltip> -->
						</span>
					</template>
					<template slot-scope="scope">
						<span
							:style="
								handleNumberColor(scope.row.dxSquidNetAmount)
							"
						>
							{{
								handleNumber(
									'USDT',
									scope.row.dxSquidNetAmount,
									2
								)
							}}
						</span>
					</template>
				</el-table-column>
				<el-table-column
					prop="serviceChargeRoundAmount"
					align="center"
					label="会员局服务费"
				>
					<template slot="header" slot-scope="{ column, $index }">
						<span>
							会员局服务费
							<el-tooltip
								class="item"
								effect="dark"
								content="汇总会员被收取的局服务费之和"
								placement="top-start"
							>
								<i class="el-icon-question"></i>
							</el-tooltip>
						</span>
					</template>
					<template slot-scope="scope">
						<span
							:style="
								handleNumberColor(
									scope.row.serviceChargeRoundAmount
								)
							"
						>
							{{
								handleNumber(
									'USDT',
									scope.row.serviceChargeRoundAmount,
									2,
									true,
									true
								)
							}}
						</span>
					</template>
				</el-table-column>
				<el-table-column
					prop="serviceChargeContributionRebateAmount"
					align="center"
					label="服务费贡献分成"
				>
					<template slot="header" slot-scope="{ column, $index }">
						<span>
							服务费贡献分成
							<el-tooltip
								class="item"
								effect="dark"
								content="统计当期获得的俱乐部服务费贡献的分成金额; 公式：俱乐部服务费贡献*团队分成比例；公式仅作参考测算，测算结果不等同实际发放金额"
								placement="top-start"
							>
								<i class="el-icon-question"></i>
							</el-tooltip>
						</span>
					</template>
					<template slot-scope="scope">
						<span
							:style="
								handleNumberColor(
									scope.row
										.serviceChargeContributionRebateAmount
								)
							"
						>
							{{
								handleNumber(
									'USDT',
									scope.row
										.serviceChargeContributionRebateAmount,
									2,
									true,
									true
								)
							}}
						</span>
					</template>
				</el-table-column>
				<el-table-column
					prop="dxClubZhanchengReceiptPaymentAmount"
					align="center"
					label="德州场馆占成交收"
				>
					<template slot="header" slot-scope="{ column, $index }">
						<span>
							德州场馆占成交收
							<el-tooltip
								class="item"
								effect="dark"
								content="汇总德州俱乐部的盈亏总额; 公式=会员俱乐部游戏输赢+会员鱿鱼游戏输赢+会员局服务费+服务费贡献分成"
								placement="top-start"
							>
								<i class="el-icon-question"></i>
							</el-tooltip>
						</span>
					</template>
					<template slot-scope="scope">
						<span
							:style="
								handleNumberColor(
									scope.row
										.dxClubZhanchengReceiptPaymentAmount
								)
							"
						>
							{{
								handleNumber(
									'USDT',
									scope.row
										.dxClubZhanchengReceiptPaymentAmount,
									2,
									true,
									true
								)
							}}
						</span>
					</template>
				</el-table-column>
			</el-table>
			<el-table
				v-loading="loading"
				element-loading-spinner="el-icon-loading"
				size="mini"
				class="small-size-table"
				:data="dialogTableData3"
				style="width: 100%; margin: 15px 0"
				:header-cell-style="getRowClass"
				highlight-current-row
			>
				<el-table-column prop="dxClubNetAmount" align="center" label="">
					<template slot-scope="scope">
						{{ scope.row.label }}
					</template>
				</el-table-column>
				<el-table-column
					prop="tableData1"
					align="center"
					label="保险投注输赢"
				>
					<template slot-scope="scope">
						<span
							v-if="scope.row.tableData1 != '/'"
							:style="handleNumberColor(scope.row.tableData1)"
						>
							{{
								handleNumber(
									'USDT',
									scope.row.tableData1,
									2,
									true,
									true
								)
							}}
						</span>
						<span v-else>/</span>
					</template>
				</el-table-column>
				<el-table-column
					prop="tableData2"
					align="center"
					label="代理保险分成"
				>
					<template slot="header" slot-scope="{ column, $index }">
						<span>
							代理保险分成
							<el-tooltip
								class="item"
								effect="dark"
								content="统计当期获得的会员保险投注输赢的分成金额; 公式：-（保险投注输赢*团队分成比例）；公式仅作参考测算，测算结果不等同实际发放金额"
								placement="top-start"
							>
								<i class="el-icon-question"></i>
							</el-tooltip>
						</span>
					</template>
					<template slot-scope="scope">
						<span
							v-if="scope.row.tableData2 != '/'"
							:style="handleNumberColor(scope.row.tableData2)"
						>
							{{
								handleNumber(
									'USDT',
									scope.row.tableData2,
									2,
									true,
									true
								)
							}}
						</span>
						<span v-else>/</span>
					</template>
				</el-table-column>
				<el-table-column
					prop="tableData3"
					align="center"
					label="会员增值服务消费"
				>
					<!-- DXCD-1107 TODO:: -->
					<template slot="header" slot-scope="{ column, $index }">
						<span>
							会员增值服务消费
							<el-tooltip
								class="item"
								effect="dark"
								content="会员在德州场馆内因增值服务、商城、返利等功能引起的资金变动。"
								placement="top-start"
							>
								<i class="el-icon-question"></i>
							</el-tooltip>
						</span>
					</template>
					<template slot-scope="scope">
						<span
							v-if="scope.row.tableData3 != '/'"
							:style="handleNumberColor(scope.row.tableData3)"
						>
							{{
								handleNumber(
									'USDT',
									scope.row.tableData3,
									2,
									true,
									true
								)
							}}
						</span>
						<span v-else>/</span>
					</template>
				</el-table-column>
				<el-table-column
					prop="tableData4"
					align="center"
					label="增值服务消费分成"
				>
					<template slot="header" slot-scope="{ column, $index }">
						<span>
							增值服务消费分成
							<el-tooltip
								class="item"
								effect="dark"
								content="统计当期获得的会员增值服务消费的分成金额。"
								placement="top-start"
							>
								<i class="el-icon-question"></i>
							</el-tooltip>
						</span>
					</template>
					<template slot-scope="scope">
						<span
							v-if="scope.row.tableData4 != '/'"
							:style="handleNumberColor(scope.row.tableData4)"
						>
							{{
								handleNumber(
									'USDT',
									scope.row.tableData4,
									2,
									true,
									true
								)
							}}
						</span>
						<span v-else>/</span>
					</template>
				</el-table-column>
				<el-table-column
					prop="tableData5"
					align="center"
					label="德州场馆占成交收"
				>
					<template slot="header" slot-scope="{ column, $index }">
						<span>
							德州场馆占成交收
							<el-tooltip
								class="item"
								effect="dark"
								content="汇总账单周期内我的团队在德州场馆保险玩法和增值服务消费的支出和收入之和; 公式：保险投注输赢+代理保险分成+会员增值服务消费+增值服务消费分成"
								placement="top-start"
							>
								<i class="el-icon-question"></i>
							</el-tooltip>
						</span>
					</template>
					<template slot-scope="scope">
						<span
							v-if="scope.row.tableData5 != '/'"
							:style="handleNumberColor(scope.row.tableData5)"
						>
							{{
								handleNumber(
									'USDT',
									scope.row.tableData5,
									2,
									true,
									true
								)
							}}
						</span>
						<span v-else>/</span>
					</template>
				</el-table-column>
			</el-table>
			<el-table
				v-loading="loading"
				element-loading-spinner="el-icon-loading"
				size="mini"
				class="small-size-table"
				:data="dialogTableData4"
				style="width: 100%; margin: 15px 0"
				:header-cell-style="getRowClass"
				highlight-current-row
			>
				<el-table-column prop="userName" align="center" label="">
					<template slot-scope="scope">
						{{ scope.row.label }}
					</template>
				</el-table-column>
				<el-table-column
					prop="listData1"
					align="center"
					label="会员游戏输赢"
				>
					<template slot-scope="scope">
						<span
							v-if="scope.row.listData1 != '/'"
							:style="handleNumberColor(scope.row.listData1)"
						>
							{{
								handleNumber(
									'USDT',
									scope.row.listData1,
									2,
									true,
									true
								)
							}}
						</span>
						<span v-else>/</span>
					</template>
				</el-table-column>
				<!-- <el-table-column
				prop="listData2"
				align="center"
				label="游戏输赢分摊"
				v-if="
					dialogTableData.length &&
					dialogTableData[0].zhanchengFlag != 0
				"
			>
				<template slot="header" slot-scope="{ column, $index }">
					<span>
						游戏输赢分摊
						<el-tooltip
							class="item"
							effect="dark"
							content="计算因为占成而需要分摊的盈亏金额;公式：-（会员游戏输赢*团队占成比例）"
							placement="top-start"
						>
							<i class="el-icon-question"></i>
						</el-tooltip>
					</span>
				</template>
				<template slot-scope="scope">
					<span
						v-if="scope.row.listData2 != '/'"
						:style="handleNumberColor(scope.row.listData2)"
					>
						{{
							handleNumber('USDT', scope.row.listData2, 2)
						}}
					</span>
					<span v-else>/</span>
				</template>
			</el-table-column> -->
				<el-table-column
					prop="listData6"
					align="center"
					label="输赢重算调整"
				>
					<template slot="header" slot-scope="{ column, $index }">
						<span>
							输赢重算调整
							<el-tooltip
								class="item"
								effect="dark"
								content="由于注单重算引起的输赢金额变动差值"
								placement="top-start"
							>
								<i class="el-icon-question"></i>
							</el-tooltip>
						</span>
					</template>
					<template slot-scope="scope">
						<span
							v-if="scope.row.listData6 != '/'"
							:style="handleNumberColor(scope.row.listData6)"
						>
							{{ handleNumber('USDT', scope.row.listData6, 2) }}
						</span>
						<span v-else>/</span>
					</template>
				</el-table-column>
				<el-table-column
					prop="listData3"
					align="center"
					label="有效投注返点"
				>
					<template slot="header" slot-scope="{ column, $index }">
						<span>
							有效投注返点
							<el-tooltip
								class="item"
								effect="dark"
								content="统计当期获得的有效投注返点金额; 公式：有效投注*团队返点比例；公式仅作参考测算，测算结果不等同实际发放金额"
								placement="top-start"
							>
								<i class="el-icon-question"></i>
							</el-tooltip>
						</span>
					</template>
					<template slot-scope="scope">
						<span
							v-if="scope.row.listData3 != '/'"
							:style="handleNumberColor(scope.row.listData3)"
						>
							{{
								handleNumber(
									'USDT',
									scope.row.listData3,
									2,
									true,
									true
								)
							}}
						</span>
						<span v-else>/</span>
					</template>
				</el-table-column>
				<el-table-column
					prop="listData7"
					align="center"
					label="返点重算调整"
				>
					<template slot="header" slot-scope="{ column, $index }">
						<span>
							返点重算调整
							<el-tooltip
								class="item"
								effect="dark"
								content="由于注单重算引起的代理返点金额变动差值"
								placement="top-start"
							>
								<i class="el-icon-question"></i>
							</el-tooltip>
						</span>
					</template>
					<template slot-scope="scope">
						<span
							v-if="scope.row.listData7 != '/'"
							:style="handleNumberColor(scope.row.listData7)"
						>
							{{ handleNumber('USDT', scope.row.listData7, 2) }}
						</span>
						<span v-else>/</span>
					</template>
				</el-table-column>
				<el-table-column
					prop="listData4"
					align="center"
					label="团队占成比例"
				>
					<template slot-scope="scope">
						<span v-if="scope.row.listData4 != '/'">
							{{ handlePercentage(scope.row.listData4) }}
						</span>
						<span v-else>/</span>
					</template>
				</el-table-column>
				<el-table-column
					prop="listData5"
					align="center"
					label="其他场馆占成交收"
				>
					<template slot="header" slot-scope="{ column, $index }">
						<span>
							其他场馆占成交收
							<el-tooltip
								class="item"
								effect="dark"
								placement="top-start"
							>
								<div slot="content">
									<p>
										统计当期其他场馆占成交收金额；公式：(会员游戏输赢+输赢重算调整+有效投注返点+返点重算调整)*(1-团队占成比例)
									</p>
								</div>
								<i class="el-icon-question"></i>
							</el-tooltip>
						</span>
					</template>
					<template slot-scope="scope">
						<span
							v-if="scope.row.listData5 != '/'"
							:style="handleNumberColor(scope.row.listData5)"
						>
							{{
								handleNumber(
									'USDT',
									scope.row.listData5,
									2,
									true,
									true
								)
							}}
						</span>
						<span v-else>/</span>
					</template>
				</el-table-column>
			</el-table>
			<el-table
				v-loading="loading"
				element-loading-spinner="el-icon-loading"
				size="mini"
				class="small-size-table"
				:data="dialogTableData"
				style="width: 100%; margin: 15px 0"
				:header-cell-style="getRowClass"
				highlight-current-row
			>
				<el-table-column prop="teamNetAmount" align="center" label="">
					<template slot-scope="scope">其他占成交收</template>
				</el-table-column>
				<el-table-column
					prop="dyActivityBonusAmount"
					align="center"
					label="电子活动奖金"
				>
					<template slot="header" slot-scope="{ column, $index }">
						<span>
							电子活动奖金
							<el-tooltip
								class="item"
								effect="dark"
								content="会员获得的电子场馆活动奖金"
								placement="top-start"
							>
								<i class="el-icon-question"></i>
							</el-tooltip>
						</span>
					</template>
					<template slot-scope="scope">
						<span
							:style="
								handleNumberColor(
									scope.row.dyActivityBonusAmount
								)
							"
						>
							{{
								handleNumber(
									'USDT',
									scope.row.dyActivityBonusAmount,
									2,
									true,
									true
								)
							}}
						</span>
					</template>
				</el-table-column>
				<el-table-column
					prop="zrRewardAmount"
					align="center"
					label="其他收支项"
				>
					<template slot="header" slot-scope="{ column, $index }">
						<span>
							会员打赏
							<el-tooltip
								class="item"
								effect="dark"
								content="汇总会员打赏荷官或主播消费的金额"
								placement="top-start"
							>
								<i class="el-icon-question"></i>
							</el-tooltip>
						</span>
					</template>
					<template slot-scope="scope">
						<span
							:style="handleNumberColor(scope.row.zrRewardAmount)"
						>
							{{
								handleNumber(
									'USDT',
									scope.row.zrRewardAmount,
									2,
									true,
									true
								)
							}}
						</span>
					</template>
				</el-table-column>
				<el-table-column
					prop="memberRebateAddAmount"
					align="center"
					label="会员返水调整"
				>
					<template slot-scope="scope">
						<span
							:style="
								handleNumberColor(
									scope.row.memberRebateAddAmount
								)
							"
						>
							{{
								handleNumber(
									'USDT',
									scope.row.memberRebateAddAmount,
									2,
									true,
									true
								)
							}}
						</span>
					</template>
				</el-table-column>
				<el-table-column
					prop="memberAccountAdjustmentAmount"
					align="center"
					label="会员账户调整"
				>
					<template slot-scope="scope">
						<span
							:style="
								handleNumberColor(
									scope.row.memberAccountAdjustmentAmount
								)
							"
						>
							{{
								handleNumber(
									'USDT',
									scope.row.memberAccountAdjustmentAmount,
									2,
									true,
									true
								)
							}}
						</span>
					</template>
				</el-table-column>
				<el-table-column
					prop="proxyIncomeAmount"
					align="center"
					label="代理收入调整"
				>
					<template slot-scope="scope">
						<span
							:style="
								handleNumberColor(scope.row.proxyIncomeAmount)
							"
						>
							{{
								handleNumber(
									'USDT',
									scope.row.proxyIncomeAmount,
									2,
									true,
									true
								)
							}}
						</span>
					</template>
				</el-table-column>
				<el-table-column
					prop="proxyAccountAdjustmentAmount"
					align="center"
					label="代理账户调整"
				>
					<template slot-scope="scope">
						<span
							:style="
								handleNumberColor(
									scope.row.proxyAccountAdjustmentAmount
								)
							"
						>
							{{
								handleNumber(
									'USDT',
									scope.row.proxyAccountAdjustmentAmount,
									2,
									true,
									true
								)
							}}
						</span>
					</template>
				</el-table-column>
				<el-table-column
					prop="otherZhanchengReceiptPaymentAmount"
					align="center"
					label="其他占成交收总计"
				>
					<template slot="header" slot-scope="{ column, $index }">
						<span>
							其他占成交收总计
							<el-tooltip
								class="item"
								effect="dark"
								content="汇总其他项盈亏的总额; 公式：电子活动奖金+会员打赏+会员返水调整+会员账户调整+代理收入调整+代理账户调整"
								placement="top-start"
							>
								<i class="el-icon-question"></i>
							</el-tooltip>
						</span>
					</template>
					<template slot-scope="scope">
						<span
							:style="
								handleNumberColor(
									scope.row.otherZhanchengReceiptPaymentAmount
								)
							"
						>
							{{
								handleNumber(
									'USDT',
									scope.row
										.otherZhanchengReceiptPaymentAmount,
									2,
									true,
									true
								)
							}}
						</span>
					</template>
				</el-table-column>
			</el-table>
			<DarkWaterRed
				v-if="curData.proxyLevel == 0"
				label="本期分红"
				:startDate="curData.cycleStartDate"
				:endDate="curData.cycleEndDate"
				:proxyId="curData.proxyId"
			/>
		</el-dialog>
	</div>
</template>

<script>
import list from '@/mixins/list'
import dayjs from 'dayjs'
import DarkWaterRed from '@/components/Funds/DarkWaterRed/index'

export default {
  components: {
    DarkWaterRed
  },
  mixins: [list],
  props: {
    curData: {
      type: Object,
      default: () => { }
    },
    queryData: {
      type: Object,
      default: () => { }
    },
    visible: {
      type: Boolean,
      default: false
    },
    handleVisible: {
      type: Object,
      default: () => { }
    }
  },
  data() {
    return {
      dayjs,
      loading: false,
      businessModelData: '',
      dialogTableData: [],
      dialogTableData1: [],
      dialogTableData2: [],
      dialogTableData3: [],
      dialogTableData4: [],
      activeName: '1',
      agentListSwitch: true,
      memberListSwitch: true,
      agentAmount: 0,
      memberAmount: 0,
      agentList: [],
      agentPage: 1,
      listIndex1: 0, // 左侧树形结构 0代理  1会员
      agentListIndex: 0,
      agentTotalPage: 0,
      memberList: [],
      memberPage: 1,
      memberListIndex: 0,
      memberTotalPage: 0,
      proxyId: '',
      proxyName: '',
      typeStr: '',
      paymentStr: '', // tab页下 左侧slide 应收/应付
      paymentStatus: '',
      curMemberName: '',
      data: [],
      loadDataAgentLoading: false,
      loadDataMemberLoading: false,
      zhanchengVisible: false
    }
  },
  watch: {
    curData: {
      handler(newVal) {
        if (!newVal) return
        this.getData()
      },
      deep: true
    }
  },
  created() {
    this.proxyId = this.curData.proxyId
    this.proxyName = this.curData.proxyName
    this.typeStr =
      this.curData.shouldReceiptPaymentParentAmount < 0 ? '应付' : '应收'
    this.getData()
  },
  methods: {
    addAgentPage() {
      this.agentPage++
      this.loadDataAgent()
    },
    addMemberPage() {
      this.memberPage++
      this.loadDataMember()
    },
    handleClick(tab, event) {
      this.activeName = String(tab.name)
      this.proxyId = this.curData.proxyId
      this.proxyName = this.curData.proxyName
      this.listIndex1 = 0
      this.memberListIndex = 0
      this.agentListIndex = 0
      this.curMemberName = ''
      this.agentAmount = 0
      this.memberAmount = 0
      this.agentList = []
      this.memberList = []
      this.agentPage = 1
      this.memberPage = 1
      this.dialogTableData = []
      if (this.activeName == 2) {
        this.paymentStr = '应收'
        this.paymentStatus = 1
        this.loadDataAgent()
        this.loadDataMember()
      } else if (this.activeName == 3) {
        this.paymentStr = '应付'
        this.paymentStatus = 2
        this.loadDataAgent()
        this.loadDataMember()
      } else {
        this.paymentStatus = ''
        this.proxyId = this.curData.proxyId
        this.proxyName = this.curData.proxyName
        this.getData()
      }
    },
    getAgentChildrenData(item, index) {
      this.proxyId = item.proxyId
      this.proxyName = item.proxyName
      this.listIndex1 = 0
      this.agentListIndex = index
      this.getData()
    },
    getMemberChildrenData(item, index) {
      this.memberListIndex = index
      this.memberCurData = item
      this.listIndex1 = 1
      this.getMemberData(item)
    },
    getMemberData(item) {
      this.dialogTableData3 = []
      this.loading = true
      this.$api
        .memberTeamBillDetail({
          cycleEndDate: this.curData.cycleEndDate,
          cycleStartDate: this.curData.cycleStartDate,
          memberId: item.memberId
        })
        .then((res) => {
          this.dialogTableData3 = []
          this.loading = false
          this.data = [res.data || {}]
          const list1 = [
            '体育',
            '电竞',
            '棋牌',
            '彩票',
            '电子',
            '真人',
            '总计'
          ]
          for (const index in list1) {
            const e = {
              label: list1[index]
            }
            if (list1[index] == '体育') {
              (e.listData1 = res.data.tyNetAmount),
                (e.listData2 = res.data.tyRebateAmount),
                (e.listData3 = '/'),
                (e.listData4 = res.data.tyMemberNetAmount),
                (e.listData5 =
                  res.data.tyNetRecalculationAdjustmentAmount),
                (e.listData6 =
                  res.data.tyRebateRecalculationAdjustmentAmount)
            } else if (list1[index] == '电竞') {
              (e.listData1 = res.data.djNetAmount),
                (e.listData2 = res.data.djRebateAmount),
                (e.listData3 = '/'),
                (e.listData4 = res.data.djMemberNetAmount),
                (e.listData5 =
                  res.data.djNetRecalculationAdjustmentAmount),
                (e.listData6 =
                  res.data.djRebateRecalculationAdjustmentAmount)
            } else if (list1[index] == '棋牌') {
              (e.listData1 = res.data.qpNetAmount),
                (e.listData2 = res.data.qpRebateAmount),
                (e.listData3 = '/'),
                (e.listData4 = res.data.qpMemberNetAmount),
                (e.listData5 =
                  res.data.qpNetRecalculationAdjustmentAmount),
                (e.listData6 =
                  res.data.qpRebateRecalculationAdjustmentAmount)
            } else if (list1[index] == '彩票') {
              (e.listData1 = res.data.cpNetAmount),
                (e.listData2 = res.data.cpRebateAmount),
                (e.listData3 = '/'),
                (e.listData4 = res.data.cpMemberNetAmount),
                (e.listData5 =
                  res.data.cpNetRecalculationAdjustmentAmount),
                (e.listData6 =
                  res.data.cpRebateRecalculationAdjustmentAmount)
            } else if (list1[index] == '电子') {
              (e.listData1 = res.data.dyNetAmount),
                (e.listData2 = res.data.dyRebateAmount),
                (e.listData3 = res.data.dyActivityBonusAmount),
                (e.listData4 = res.data.dyMemberNetAmount),
                (e.listData5 =
                  res.data.dyNetRecalculationAdjustmentAmount),
                (e.listData6 =
                  res.data.dyRebateRecalculationAdjustmentAmount)
            } else if (list1[index] == '真人') {
              (e.listData1 = res.data.zrNetAmount),
                (e.listData2 = res.data.zrRebateAmount),
                (e.listData3 = res.data.zrRewardAmount),
                (e.listData4 = res.data.zrMemberNetAmount),
                (e.listData5 =
                  res.data.zrNetRecalculationAdjustmentAmount),
                (e.listData6 =
                  res.data.zrRebateRecalculationAdjustmentAmount)
            } else if (list1[index] == '总计') {
              (e.listData1 = res.data.totalNetAmount),
                (e.listData2 = res.data.totalRebateAmount),
                (e.listData3 = res.data.totalRewardAmount),
                (e.listData4 = res.data.totalMemberNetAmount),
                (e.listData5 =
                  res.data.netRecalculationAdjustmentAmountSub),
                (e.listData6 =
                  res.data.rebateRecalculationAdjustmentAmountSub)
            }
            this.dialogTableData3.push(e)
          }
        })
        .catch(() => {
          this.loading = false
        })
    },
    // 获取代理账号信息
    getData() {
      this.loading = true
      this.dialogTableData = []
      this.dialogTableData1 = []
      this.dialogTableData2 = []
      this.dialogTableData3 = []
      this.dialogTableData4 = []

      this.$api
        .proxyTeamBillDetail({
          cycleEndDate: this.curData.cycleEndDate,
          cycleStartDate: this.curData.cycleStartDate,
          proxyId: this.proxyId
        })
        .then((res) => {
          this.dialogTableData = []
          this.dialogTableData1 = []
          this.dialogTableData2 = []
          this.dialogTableData3 = []
          this.dialogTableData4 = []
          this.loading = false
          this.dialogTableData.push(res.data)
          const list1 = [
            '体育',
            '电竞',
            '棋牌',
            '彩票',
            '电子',
            '真人',
            '总计'
          ]
          for (const index in list1) {
            const e = {
              label: list1[index]
            }
            if (list1[index] == '体育') {
              (e.listData1 = res.data.tyNetAmount),
                (e.listData2 = res.data.tyPartNetAmount),
                (e.listData3 = res.data.tyRebateAmount),
                (e.listData4 = res.data.tyPartRebateAmount),
                (e.listData5 = '/'),
                (e.listData6 = res.data.tyTeamNetAmount),
                (e.listData7 =
                  res.data.tyNetRecalculationAdjustmentAmount),
                (e.listData8 =
                  res.data.tyRebateRecalculationAdjustmentAmount)
            } else if (list1[index] == '电竞') {
              (e.listData1 = res.data.djNetAmount),
                (e.listData2 = res.data.djPartNetAmount),
                (e.listData3 = res.data.djRebateAmount),
                (e.listData4 = res.data.djPartRebateAmount),
                (e.listData5 = '/'),
                (e.listData6 = res.data.djTeamNetAmount),
                (e.listData7 =
                  res.data.djNetRecalculationAdjustmentAmount),
                (e.listData8 =
                  res.data.djRebateRecalculationAdjustmentAmount)
            } else if (list1[index] == '棋牌') {
              (e.listData1 = res.data.qpNetAmount),
                (e.listData2 = res.data.qpPartNetAmount),
                (e.listData3 = res.data.qpRebateAmount),
                (e.listData4 = res.data.qpPartRebateAmount),
                (e.listData5 = '/'),
                (e.listData6 = res.data.qpTeamNetAmount),
                (e.listData7 =
                  res.data.qpNetRecalculationAdjustmentAmount),
                (e.listData8 =
                  res.data.qpRebateRecalculationAdjustmentAmount)
            } else if (list1[index] == '彩票') {
              (e.listData1 = res.data.cpNetAmount),
                (e.listData2 = res.data.cpPartNetAmount),
                (e.listData3 = res.data.cpRebateAmount),
                (e.listData4 = res.data.cpPartRebateAmount),
                (e.listData5 = '/'),
                (e.listData6 = res.data.cpTeamNetAmount),
                (e.listData7 =
                  res.data.cpNetRecalculationAdjustmentAmount),
                (e.listData8 =
                  res.data.cpRebateRecalculationAdjustmentAmount)
            } else if (list1[index] == '电子') {
              (e.listData1 = res.data.dyNetAmount),
                (e.listData2 = res.data.dyPartNetAmount),
                (e.listData3 = res.data.dyRebateAmount),
                (e.listData4 = res.data.dyPartRebateAmount),
                (e.listData5 = res.data.dyActivityBonusAmount),
                (e.listData6 = res.data.dyTeamNetAmount),
                (e.listData7 =
                  res.data.dyNetRecalculationAdjustmentAmount),
                (e.listData8 =
                  res.data.dyRebateRecalculationAdjustmentAmount)
            } else if (list1[index] == '真人') {
              (e.listData1 = res.data.zrNetAmount),
                (e.listData2 = res.data.zrPartNetAmount),
                (e.listData3 = res.data.zrRebateAmount),
                (e.listData4 = res.data.zrPartRebateAmount),
                (e.listData5 = res.data.zrRewardAmount),
                (e.listData6 = res.data.zrTeamNetAmount),
                (e.listData7 =
                  res.data.zrNetRecalculationAdjustmentAmount),
                (e.listData8 =
                  res.data.zrRebateRecalculationAdjustmentAmount)
            } else if (list1[index] == '总计') {
              (e.listData1 = res.data.netAmountSub),
                (e.listData2 = res.data.partNetAmountSub),
                (e.listData3 = res.data.rebateAmountSub),
                (e.listData4 = res.data.partRebateAmountSub),
                (e.listData5 = res.data.rewardAmountSub),
                (e.listData6 = res.data.teamNetAmountSub),
                (e.listData7 =
                  res.data.netRecalculationAdjustmentAmountSub),
                (e.listData8 =
                  res.data.rebateRecalculationAdjustmentAmountSub)
            }
            this.dialogTableData1.push(e)
          }
          const list2 = ['德州保险&增值服务', '总计']
          for (const index in list2) {
            const e = {
              label: list2[index]
            }
            if (list2[index] == '德州保险&增值服务') {
              (e.tableData1 = res.data.dxInsureNetAmount),
                (e.tableData2 = res.data.dxInsureRebateAmount),
                (e.tableData3 = res.data.valueAddedTotalAmount),
                (e.tableData4 =
                  res.data.valueAddedTotalRebateAmount),
                (e.tableData5 =
                  res.data.dxInsureAndValueAddedTeamNetAmount)
            } else if (list2[index] == '总计') {
              (e.tableData1 = '/'),
                (e.tableData2 = '/'),
                (e.tableData3 = '/'),
                (e.tableData4 = '/'),
                (e.tableData5 = res.data.dxTeamNetAmountSub)
            }
            this.dialogTableData2.push(e)
          }
          const list3 = ['德州保险&增值服务', '德州场馆占成交收总计']
          for (const index in list3) {
            const e = {
              label: list3[index]
            }
            if (list3[index] == '德州保险&增值服务') {
              (e.tableData1 = res.data.dxInsureNetAmount),
                (e.tableData2 = res.data.dxInsureRebateAmount),
                (e.tableData3 = res.data.valueAddedTotalAmount),
                (e.tableData4 =
                  res.data.valueAddedTotalRebateAmount),
                (e.tableData5 =
                  res.data.dxInsureZhanchengReceiptPaymentAmount)
            } else if (list3[index] == '德州场馆占成交收总计') {
              (e.tableData1 = '/'),
                (e.tableData2 = '/'),
                (e.tableData3 = '/'),
                (e.tableData4 = '/'),
                (e.tableData5 =
                  res.data.dxVenueZhanchengReceiptPaymentAmount)
            }
            this.dialogTableData3.push(e)
          }
          const list4 = [
            '体育',
            '电竞',
            '棋牌',
            '彩票',
            '电子',
            '真人',
            '其他场馆占成交收总计'
          ]
          for (const index in list4) {
            const e = {
              label: list4[index]
            }
            if (list4[index] == '体育') {
              (e.listData1 = res.data.tyNetAmount),
                (e.listData2 = res.data.tyPartNetAmount),
                (e.listData3 = res.data.tyRebateAmount),
                (e.listData4 = res.data.tyZhanchengRate),
                (e.listData5 =
                  res.data.tyZhanchengReceiptPaymentAmount),
                (e.listData6 =
                  res.data.tyNetRecalculationAdjustmentAmount),
                (e.listData7 =
                  res.data.tyRebateRecalculationAdjustmentAmount)
            } else if (list4[index] == '电竞') {
              (e.listData1 = res.data.djNetAmount),
                (e.listData2 = res.data.djPartNetAmount),
                (e.listData3 = res.data.djRebateAmount),
                (e.listData4 = res.data.djZhanchengRate),
                (e.listData5 =
                  res.data.djZhanchengReceiptPaymentAmount),
                (e.listData6 =
                  res.data.djNetRecalculationAdjustmentAmount),
                (e.listData7 =
                  res.data.djRebateRecalculationAdjustmentAmount)
            } else if (list4[index] == '棋牌') {
              (e.listData1 = res.data.qpNetAmount),
                (e.listData2 = res.data.qpPartNetAmount),
                (e.listData3 = res.data.qpRebateAmount),
                (e.listData4 = res.data.qpZhanchengRate),
                (e.listData5 =
                  res.data.qpZhanchengReceiptPaymentAmount),
                (e.listData6 =
                  res.data.qpNetRecalculationAdjustmentAmount),
                (e.listData7 =
                  res.data.qpRebateRecalculationAdjustmentAmount)
            } else if (list4[index] == '彩票') {
              (e.listData1 = res.data.cpNetAmount),
                (e.listData2 = res.data.cpPartNetAmount),
                (e.listData3 = res.data.cpRebateAmount),
                (e.listData4 = res.data.cpZhanchengRate),
                (e.listData5 =
                  res.data.cpZhanchengReceiptPaymentAmount),
                (e.listData6 =
                  res.data.cpNetRecalculationAdjustmentAmount),
                (e.listData7 =
                  res.data.cpRebateRecalculationAdjustmentAmount)
            } else if (list4[index] == '电子') {
              (e.listData1 = res.data.dyNetAmount),
                (e.listData2 = res.data.dyPartNetAmount),
                (e.listData3 = res.data.dyRebateAmount),
                (e.listData4 = res.data.dyZhanchengRate),
                (e.listData5 =
                  res.data.dyZhanchengReceiptPaymentAmount),
                (e.listData6 =
                  res.data.dyNetRecalculationAdjustmentAmount),
                (e.listData7 =
                  res.data.dyRebateRecalculationAdjustmentAmount)
            } else if (list4[index] == '真人') {
              (e.listData1 = res.data.zrNetAmount),
                (e.listData2 = res.data.zrPartNetAmount),
                (e.listData3 = res.data.zrRebateAmount),
                (e.listData4 = res.data.zrZhanchengRate),
                (e.listData5 =
                  res.data.zrZhanchengReceiptPaymentAmount),
                (e.listData6 =
                  res.data.zrNetRecalculationAdjustmentAmount),
                (e.listData7 =
                  res.data.zrRebateRecalculationAdjustmentAmount)
            } else if (list4[index] == '其他场馆占成交收总计') {
              (e.listData1 = res.data.netAmountSub),
                (e.listData2 = res.data.partNetAmountSub),
                (e.listData3 = res.data.rebateAmountSub),
                (e.listData4 = '/'),
                (e.listData5 =
                  res.data.otherVenueZhanchengReceiptPaymentAmount),
                (e.listData6 =
                  res.data.netRecalculationAdjustmentAmountSub),
                (e.listData7 =
                  res.data.rebateRecalculationAdjustmentAmountSub)
            }
            this.dialogTableData4.push(e)
          }
        })
        .catch(() => {
          this.loading = false
        })
    },
    loadDataAgent() {
      this.loadDataAgentLoading = true
      const params = {
        cycleEndDate: this.curData.cycleEndDate,
        cycleStartDate: this.curData.cycleStartDate,
        proxyId: this.curData.proxyId,
        proxyName: this.curData.proxyName,
        queryRange: '2',
        proxyRange: 2,
        pageNum: this.agentPage,
        pageSize: 10
      }
      if (this.paymentStatus) {
        params.paymentStatus = this.paymentStatus
      }
      this.$api
        .proxyTeamBillList(params)
        .then((res) => {
          if (res.code === 200) {
            this.agentList = this.agentList.concat(res.data.record)
            this.agentTotalPage = res.data.totalPage
            this.loadDataAgentLoading = false
            if (this.agentPage == 1 && res.data.record.length) {
              this.proxyId = res.data.record[0].proxyId
              this.proxyName = res.data.record[0].proxyName
              this.getData()
            }
          }
        })
        .catch(() => {
          this.loadDataAgentLoading = false
        })
      this.$api
        .proxyTeamBillTotal(params)
        .then((res) => {
          if (this.paymentStatus == 1) {
            this.agentAmount = res.data.shouldPaymentParentAmount
          } else if (this.paymentStatus == 2) {
            this.agentAmount = res.data.shouldReceiptParentAmount
          }
          this.loadDataAgentLoading = false
        })
        .catch(() => {
          this.loadDataAgentLoading = false
        })
    },
    loadDataMember() {
      this.loadDataMemberLoading = true
      const params = {
        cycleEndDate: this.curData.cycleEndDate,
        cycleStartDate: this.curData.cycleStartDate,
        memberType: 6,
        searchMemberName: this.curData.proxyName,
        pageNum: this.memberPage,
        pageSize: 10
      }
      if (this.paymentStatus) {
        params.payType = this.paymentStatus
      }
      this.$api
        .memberTeamBillList(params)
        .then((res) => {
          if (res.code === 200) {
            this.memberList = this.memberList.concat(
              res.data.record
            )
            this.memberTotalPage = res.data.totalPage
            this.loadDataMemberLoading = false
          }
        })
        .catch(() => {
          this.loadDataMemberLoading = false
        })
      this.$api
        .memberTeamBillTotal(params)
        .then((res) => {
          this.memberAmount =
            res.data.shouldPaymentReceiptParentAmountTotal
          this.loadDataMemberLoading = false
          // if(this.paymentStatus==1){
          // 	console.log(111);
          // 	this.memberAmount = res.data.shouldReceiptParentAmount
          // 	console.log(res.data);
          // 	console.log(this.memberAmount);
          // }else if(this.paymentStatus==2){
          // 	this.memberAmount = res.data.shouldPaymentParentAmount
          // 	console.log(222);
          // 	console.log(res.data);
          // 	console.log(this.memberAmount);
          // }
        })
        .catch(() => {
          this.loadDataMemberLoading = false
        })
    },
    handleClose() {
      this.$emit('update:visible', false)
    },
    getQueryData() {
      // merchantId  userId userType version
      this.$api
        .rebateRateQuery({
          merchantId: this.curData.merchantId,
          userId: this.curData.proxyId,
          version: this.curData.version || this.curData.rateVersion,
          userType: 1
        })
        .then((res) => {
          // platformFlag = 0, zhanchengFlag= 0  返点比例
          // platformFlag = 0, zhanchengFlag= 1  占成比例
          // platformFlag = 1 ,user_type = 2   会员返水
          this.other1 =
            res.data.filter(
              (ele) =>
                ele.platformFlag === 0 &&
                ele.zhanchengFlag === 0
            ) || []
          this.other2 =
            res.data.filter(
              (ele) =>
                ele.platformFlag === 0 &&
                ele.zhanchengFlag === 1
            ) || []
          this.other3 =
            res.data.filter(
              (ele) =>
                ele.platformFlag === 1 && ele.userType === 2
            ) || []
        })
    },
    getDateCircle(start, end) {
      const format = (str) =>
        `${str.substring(0, 4)}-${str.substring(4, 6)}-${str.substring(
          6,
          8
        )}`
      return `${format(start.toString())} - ${format(end.toString())}`
    }
  }
}
</script>

<style lang="scss" scoped>
::v-deep .rempadding .el-dialog__header {
	color: #909399;
	font-weight: 700;
}
::v-deep .rempadding .el-dialog__body {
	padding: 0;
	padding-bottom: 30px;
	.contentBox {
		display: flex;
		justify-content: center;
		align-items: center;
	}

	.contentBox,
	form {
		padding: 0 20px;
	}
}
.contentBox {
	text-align: center;
	font-size: 18px;
	font-weight: bold;
}
.childer-box {
	width: 100%;
	display: flex;
	.silder {
		width: 25%;
		padding-right: 20px;
		.row {
			margin-top: 20px;
			.switch {
				cursor: pointer;
			}
		}
		.display-tow {
			display: flex;
			justify-content: space-between;
		}
		.lower-user {
			padding-left: 30px;
			margin-top: 10px;
			height: 300px;
			box-sizing: border-box;
			overflow: auto;
			.list {
				padding: 5px 0;
				cursor: pointer;
			}
			.active {
				background: rgba(129, 211, 248, 1);
				color: #ffffff !important;
			}
		}
	}
	.table-content {
		width: 100%;
	}
}

.decoration {
	text-decoration: underline;
	cursor: pointer;
	font-size: 20px;
}

.mb-10 {
	margin-bottom: 10px;
}
.mb-20 {
	margin-bottom: 20px;
}
.date {
	font-size: 14px;
}
.fwb {
	font-weight: bold;
}
.amount {
	font-size: 18px;
}
.dividends-title {
	font-size: 14px;
}
</style>
